//@json
function main(tbl){
	let sql1=`select id,pid,name as title,url as href,icon,perms from sys_menu where type <> '数据' and id in (
		select menu_id from sys_role_menu where role_id = ${sattr("admin").role_id}
		)  `;
	if(sattr("admin").role_id==1){
		sql1=`select id,pid,name as title,url as href,icon,perms from sys_menu where type <> '数据' `;
	}
	let ms1=dao.select(sql1)	
	let menus=Trees.menus(ms1)
	return menus;
}